//teacherlist.js
//获取应用实例
var app = getApp();
var config = require("../../config.js");
Page({
  data: {
    teacher: {}
  },
  onLoad: function (options) {
    var that = this;
    wx.request({
      url:  config.baseUri + '/teacher/' + config.userId+'/detail?tid='+options.tid,
      method: 'GET',
      success: function (res) {
        console.log(res);
        that.setData({
          teacher: res.data.data
        });
      },
      fail: function (res) {
        console.log(res);
      }
    })
  }
})